@echo off
echo Monitoring the case+8x process
:begin
rem 定义需要监控的进程名
set DstPro="vxdata-pdf*"
set flag=""
for /f %%t in ('jps -mlv ^|findstr /i "%DstPro%"') do set flag=%%t
if %flag% equ "" (
  rem 启动指定路径下的可执行程序 -Xms4096M -Xmx4096M  
  start startPdf.bat
  echo %flag%
  echo %date% %time%
  echo case+8x Restarted
)
rem 通过ping让程序暂停5秒钟并忽略ping输出结果
ping 127.1 -n 5 >nul
goto :begin